Skip to content

Conversation

@portableDD
Copy link
Contributor

Description

Implemented sentiment analysis for event reviews to give organizers feedback on attendee perceptions. This PR introduces a new endpoint to analyze text and return sentiment classification.

Changes

  • Added /analyze-review endpoint (POST)
  • Integrated TextBlob for sentiment analysis (positive / neutral / negative)
  • Implemented analyze_sentiment helper function with polarity & subjectivity scoring
  • Added /health endpoint for monitoring
  • Included unit and integration tests (pytest + Flask test client)

Acceptance Criteria

  • /analyze-review accepts a text field in JSON and returns sentiment analysis
  • Sentiment categories: positive, neutral, negative
  • Uses TextBlob for sentiment calculation
  • Unit tests cover sentiment function and endpoints

Testing

  • Run pytest -v to execute tests
  • Verified positive, negative, neutral, and empty text cases
  • Verified endpoint error handling for missing JSON and text fields

close #34

@BigBen-7 BigBen-7 merged commit a68e800 into Lead-Studios:main Oct 3, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue 10: Sentiment analysis on event reviews

2 participants